package gui.tiemchung;

import control.tiemchung.TCMainPanel_ctrl;
import gui.event.tiemchung.TCMainPanel_evt;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JButton;
import javax.swing.JTabbedPane;
import javax.swing.JTable;

public class TCMainPanel extends javax.swing.JPanel {
    
    private List<JButton> listButton;
    public TCMainPanel() {
        initComponents();
        this.setName("Quản Lý Tiêm Chủng");
        
        listButton = new ArrayList<JButton>();
        listButton.add(btnChiTiet);
        listButton.add(btnSua);
        listButton.add(btnThemPieuTiemChung);
        listButton.add(btnSuaTrangThai);
        listButton.add(btnXoa);
        
        TCMainPanel_ctrl.loadAllHoSoTiemChung(btlTiemChung);
    }
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroupTrangThai = new javax.swing.ButtonGroup();
        jPanelHead = new javax.swing.JPanel();
        jPanelLeftHead = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        pnlDieuKienLietKe = new javax.swing.JPanel();
        txtTenVatNuoi = new javax.swing.JTextField();
        txtTenBenh = new javax.swing.JFormattedTextField();
        btnLietKe = new javax.swing.JButton();
        jLabel6 = new javax.swing.JLabel();
        jDateChooserngayBatDau = new com.toedter.calendar.JDateChooser();
        txtMaHoSo = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jRadioButtonChuaKetThuc = new javax.swing.JRadioButton();
        jRadioButtonKetThuc = new javax.swing.JRadioButton();
        jDateChooserNgayKetThuc = new com.toedter.calendar.JDateChooser();
        jLabel7 = new javax.swing.JLabel();
        ckboxMaVatNuoi = new javax.swing.JCheckBox();
        ckboxTenVatNuoi = new javax.swing.JCheckBox();
        ckboxTenBenh = new javax.swing.JCheckBox();
        txtMaVatNuoi = new javax.swing.JTextField();
        ckboxMaVatNuoi1 = new javax.swing.JCheckBox();
        jPanelBody = new javax.swing.JPanel();
        jPanelCacChucNang = new javax.swing.JPanel();
        btnThem = new javax.swing.JButton();
        btnSua = new javax.swing.JButton();
        btnIn = new javax.swing.JButton();
        btnChiTiet = new javax.swing.JButton();
        btnClose = new javax.swing.JButton();
        btnThemPieuTiemChung = new javax.swing.JButton();
        btnSuaTrangThai = new javax.swing.JButton();
        btnXoa = new javax.swing.JButton();
        jPanelCanhLeTrai = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jPanelCanhLeTren = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        btlTiemChung = new javax.swing.JTable();
        jPanelCanhLePhai = new javax.swing.JPanel();
        jPanelCanhDuoi = new javax.swing.JPanel();

        setPreferredSize(new java.awt.Dimension(1361, 562));
        setLayout(new java.awt.BorderLayout());

        jPanelHead.setPreferredSize(new java.awt.Dimension(1023, 139));
        jPanelHead.setLayout(new java.awt.BorderLayout());

        jPanelLeftHead.setPreferredSize(new java.awt.Dimension(10, 139));

        javax.swing.GroupLayout jPanelLeftHeadLayout = new javax.swing.GroupLayout(jPanelLeftHead);
        jPanelLeftHead.setLayout(jPanelLeftHeadLayout);
        jPanelLeftHeadLayout.setHorizontalGroup(
            jPanelLeftHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 10, Short.MAX_VALUE)
        );
        jPanelLeftHeadLayout.setVerticalGroup(
            jPanelLeftHeadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 139, Short.MAX_VALUE)
        );

        jPanelHead.add(jPanelLeftHead, java.awt.BorderLayout.LINE_START);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 10, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 139, Short.MAX_VALUE)
        );

        jPanelHead.add(jPanel2, java.awt.BorderLayout.LINE_END);

        pnlDieuKienLietKe.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Điều kiện liệt kê", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 0, 204)));

        txtTenBenh.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(new java.text.SimpleDateFormat("dd/MM/yyyy"))));
        txtTenBenh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtTenBenhActionPerformed(evt);
            }
        });

        btnLietKe.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Filter-Standard-16.png"))); // NOI18N
        btnLietKe.setText("Liệt Kê");
        btnLietKe.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLietKeActionPerformed(evt);
            }
        });

        jLabel6.setText("Từ ngày");

        txtMaHoSo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtMaHoSoActionPerformed(evt);
            }
        });

        jLabel4.setText("Trạng thái");

        buttonGroupTrangThai.add(jRadioButtonChuaKetThuc);
        jRadioButtonChuaKetThuc.setText("Chưa kết thúc");
        jRadioButtonChuaKetThuc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonChuaKetThucActionPerformed(evt);
            }
        });

        buttonGroupTrangThai.add(jRadioButtonKetThuc);
        jRadioButtonKetThuc.setText("Kết thúc");
        jRadioButtonKetThuc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonKetThucActionPerformed(evt);
            }
        });

        jLabel7.setText("Đến ngày");

        ckboxMaVatNuoi.setText("Mã hồ sơ");

        ckboxTenVatNuoi.setText("Tên vật nuôi");
        ckboxTenVatNuoi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ckboxTenVatNuoiActionPerformed(evt);
            }
        });

        ckboxTenBenh.setText("Tên bệnh");
        ckboxTenBenh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ckboxTenBenhActionPerformed(evt);
            }
        });

        txtMaVatNuoi.setText("VN-TC_01");
        txtMaVatNuoi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtMaVatNuoiActionPerformed(evt);
            }
        });

        ckboxMaVatNuoi1.setText("Mã vật nuôi");
        ckboxMaVatNuoi1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ckboxMaVatNuoi1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlDieuKienLietKeLayout = new javax.swing.GroupLayout(pnlDieuKienLietKe);
        pnlDieuKienLietKe.setLayout(pnlDieuKienLietKeLayout);
        pnlDieuKienLietKeLayout.setHorizontalGroup(
            pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDieuKienLietKeLayout.createSequentialGroup()
                .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDieuKienLietKeLayout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(ckboxMaVatNuoi))
                    .addGroup(pnlDieuKienLietKeLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(ckboxTenBenh)))
                .addGap(32, 32, 32)
                .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtMaHoSo, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)
                    .addComponent(txtTenBenh))
                .addGap(106, 106, 106)
                .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jRadioButtonChuaKetThuc, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jDateChooserngayBatDau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDieuKienLietKeLayout.createSequentialGroup()
                        .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jDateChooserNgayKetThuc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jRadioButtonKetThuc, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(104, 104, 104)
                .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(ckboxMaVatNuoi1)
                    .addComponent(ckboxTenVatNuoi))
                .addGap(30, 30, 30)
                .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnLietKe, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(txtTenVatNuoi)
                        .addComponent(txtMaVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(231, 231, 231))
        );
        pnlDieuKienLietKeLayout.setVerticalGroup(
            pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDieuKienLietKeLayout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDieuKienLietKeLayout.createSequentialGroup()
                        .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jDateChooserngayBatDau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jDateChooserNgayKetThuc, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(txtMaHoSo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(ckboxMaVatNuoi)))
                        .addGap(18, 18, 18)
                        .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jRadioButtonChuaKetThuc)
                            .addComponent(jRadioButtonKetThuc)
                            .addComponent(ckboxTenBenh)
                            .addComponent(txtTenBenh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlDieuKienLietKeLayout.createSequentialGroup()
                        .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ckboxTenVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtTenVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(pnlDieuKienLietKeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(ckboxMaVatNuoi1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtMaVatNuoi))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 5, Short.MAX_VALUE)
                .addComponent(btnLietKe)
                .addContainerGap())
        );

        jPanelHead.add(pnlDieuKienLietKe, java.awt.BorderLayout.CENTER);

        add(jPanelHead, java.awt.BorderLayout.PAGE_START);

        jPanelBody.setLayout(new java.awt.BorderLayout());

        btnThem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-16 addnew.png"))); // NOI18N
        btnThem.setText("Thêm");
        btnThem.setToolTipText("Thêm Khách Hàng Mới");
        btnThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemActionPerformed(evt);
            }
        });

        btnSua.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-16 edit.png"))); // NOI18N
        btnSua.setText("Sửa...");
        btnSua.setToolTipText("Sửa Thông Tin Khách Hàng");
        btnSua.setEnabled(false);
        btnSua.setPreferredSize(new java.awt.Dimension(79, 25));
        btnSua.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSuaActionPerformed(evt);
            }
        });

        btnIn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Printer-16.png"))); // NOI18N
        btnIn.setText("In...");
        btnIn.setPreferredSize(new java.awt.Dimension(79, 25));
        btnIn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnInActionPerformed(evt);
            }
        });

        btnChiTiet.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/View-Details-16.png"))); // NOI18N
        btnChiTiet.setText("Chi Tiết...");
        btnChiTiet.setEnabled(false);
        btnChiTiet.setMaximumSize(new java.awt.Dimension(79, 25));
        btnChiTiet.setMinimumSize(new java.awt.Dimension(79, 25));
        btnChiTiet.setPreferredSize(new java.awt.Dimension(79, 25));
        btnChiTiet.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnChiTietActionPerformed(evt);
            }
        });

        btnClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Close-16.png"))); // NOI18N
        btnClose.setText("Đóng");
        btnClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCloseActionPerformed(evt);
            }
        });

        btnThemPieuTiemChung.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-16 addnew.png"))); // NOI18N
        btnThemPieuTiemChung.setText("Thêm Phiếu Tiêm Chủng");
        btnThemPieuTiemChung.setToolTipText("Thêm Khách Hàng Mới");
        btnThemPieuTiemChung.setEnabled(false);
        btnThemPieuTiemChung.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemPieuTiemChungActionPerformed(evt);
            }
        });

        btnSuaTrangThai.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-16 edit.png"))); // NOI18N
        btnSuaTrangThai.setText("Thay đổi trạng thái");
        btnSuaTrangThai.setToolTipText("Sửa Thông Tin Khách Hàng");
        btnSuaTrangThai.setEnabled(false);
        btnSuaTrangThai.setPreferredSize(new java.awt.Dimension(79, 25));

        btnXoa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-16 delete.png"))); // NOI18N
        btnXoa.setText("Xóa");
        btnXoa.setToolTipText("Sửa Thông Tin Khách Hàng");
        btnXoa.setEnabled(false);
        btnXoa.setPreferredSize(new java.awt.Dimension(79, 25));
        btnXoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnXoaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelCacChucNangLayout = new javax.swing.GroupLayout(jPanelCacChucNang);
        jPanelCacChucNang.setLayout(jPanelCacChucNangLayout);
        jPanelCacChucNangLayout.setHorizontalGroup(
            jPanelCacChucNangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCacChucNangLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnThem, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSua, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnXoa, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnIn, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnChiTiet, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnThemPieuTiemChung)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSuaTrangThai, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 377, Short.MAX_VALUE)
                .addComponent(btnClose, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(57, 57, 57))
        );
        jPanelCacChucNangLayout.setVerticalGroup(
            jPanelCacChucNangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCacChucNangLayout.createSequentialGroup()
                .addGroup(jPanelCacChucNangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSua, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnIn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnThem)
                    .addComponent(btnChiTiet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnClose)
                    .addComponent(btnThemPieuTiemChung)
                    .addComponent(btnSuaTrangThai, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnXoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jPanelBody.add(jPanelCacChucNang, java.awt.BorderLayout.PAGE_START);

        jPanelCanhLeTrai.setPreferredSize(new java.awt.Dimension(12, 398));

        javax.swing.GroupLayout jPanelCanhLeTraiLayout = new javax.swing.GroupLayout(jPanelCanhLeTrai);
        jPanelCanhLeTrai.setLayout(jPanelCanhLeTraiLayout);
        jPanelCanhLeTraiLayout.setHorizontalGroup(
            jPanelCanhLeTraiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 12, Short.MAX_VALUE)
        );
        jPanelCanhLeTraiLayout.setVerticalGroup(
            jPanelCanhLeTraiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 398, Short.MAX_VALUE)
        );

        jPanelBody.add(jPanelCanhLeTrai, java.awt.BorderLayout.LINE_START);

        jPanel3.setLayout(new java.awt.BorderLayout());

        jPanelCanhLeTren.setPreferredSize(new java.awt.Dimension(1349, 10));

        javax.swing.GroupLayout jPanelCanhLeTrenLayout = new javax.swing.GroupLayout(jPanelCanhLeTren);
        jPanelCanhLeTren.setLayout(jPanelCanhLeTrenLayout);
        jPanelCanhLeTrenLayout.setHorizontalGroup(
            jPanelCanhLeTrenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1368, Short.MAX_VALUE)
        );
        jPanelCanhLeTrenLayout.setVerticalGroup(
            jPanelCanhLeTrenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 10, Short.MAX_VALUE)
        );

        jPanel3.add(jPanelCanhLeTren, java.awt.BorderLayout.PAGE_START);

        btlTiemChung.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"VN-TC_01", null, "Cún", "Dại", "19/4/2014", "20/4/2014",  new Boolean(false), null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null,  new Boolean(false), null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null}
            },
            new String [] {
                "Mã hồ sơ ", "Mã vật nuôi", "Tên vật nuôi", "Bệnh", "Ngày bắt đầu ", "Ngày kết thúc", "Trạng thái", "Ghi chú"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Object.class, java.lang.Integer.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Boolean.class, java.lang.Object.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        btlTiemChung.setColumnSelectionAllowed(true);
        btlTiemChung.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        btlTiemChung.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                btlTiemChungFocusGained(evt);
            }
        });
        jScrollPane1.setViewportView(btlTiemChung);
        btlTiemChung.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);

        jPanel3.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        jPanelCanhLePhai.setPreferredSize(new java.awt.Dimension(12, 388));

        javax.swing.GroupLayout jPanelCanhLePhaiLayout = new javax.swing.GroupLayout(jPanelCanhLePhai);
        jPanelCanhLePhai.setLayout(jPanelCanhLePhaiLayout);
        jPanelCanhLePhaiLayout.setHorizontalGroup(
            jPanelCanhLePhaiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 12, Short.MAX_VALUE)
        );
        jPanelCanhLePhaiLayout.setVerticalGroup(
            jPanelCanhLePhaiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 378, Short.MAX_VALUE)
        );

        jPanel3.add(jPanelCanhLePhai, java.awt.BorderLayout.LINE_END);

        jPanelCanhDuoi.setPreferredSize(new java.awt.Dimension(1372, 10));

        javax.swing.GroupLayout jPanelCanhDuoiLayout = new javax.swing.GroupLayout(jPanelCanhDuoi);
        jPanelCanhDuoi.setLayout(jPanelCanhDuoiLayout);
        jPanelCanhDuoiLayout.setHorizontalGroup(
            jPanelCanhDuoiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1368, Short.MAX_VALUE)
        );
        jPanelCanhDuoiLayout.setVerticalGroup(
            jPanelCanhDuoiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 10, Short.MAX_VALUE)
        );

        jPanel3.add(jPanelCanhDuoi, java.awt.BorderLayout.PAGE_END);

        jPanelBody.add(jPanel3, java.awt.BorderLayout.CENTER);

        add(jPanelBody, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    // <editor-fold defaultstate="collapsed" desc="Event"> 
    private void btnLietKeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLietKeActionPerformed
        TCMainPanel_evt.btnLietKeActionPerformed(btlTiemChung, txtMaHoSo, txtMaVatNuoi, txtTenBenh, txtTenVatNuoi, jDateChooserngayBatDau, jDateChooserNgayKetThuc, buttonGroupTrangThai);
    }//GEN-LAST:event_btnLietKeActionPerformed

    private void btnThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemActionPerformed
        TCMainPanel_evt.btnThemActionPerformed(btlTiemChung);
    }//GEN-LAST:event_btnThemActionPerformed

    private void btnSuaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSuaActionPerformed
        TCMainPanel_evt.btnSuaActionPerformed(btlTiemChung);
    }//GEN-LAST:event_btnSuaActionPerformed

    private void btnInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnInActionPerformed
        TCMainPanel_evt.btnInActionPerformed(btlTiemChung);
    }//GEN-LAST:event_btnInActionPerformed

    private void btnChiTietActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnChiTietActionPerformed
        TCMainPanel_evt.btnChiTietActionPerformed(btlTiemChung);
    }//GEN-LAST:event_btnChiTietActionPerformed

    private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloseActionPerformed
        TCMainPanel_evt.btnCloseActionPerformed(this, (JTabbedPane)this.getParent());
    }//GEN-LAST:event_btnCloseActionPerformed

    private void btnThemPieuTiemChungActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemPieuTiemChungActionPerformed
        TCMainPanel_evt.btnThemPhieuTiemChungActionPerformed();
    }//GEN-LAST:event_btnThemPieuTiemChungActionPerformed

    private void btlTiemChungFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_btlTiemChungFocusGained
        TCMainPanel_evt.btlTiemChungFocusGained(this.listButton, this.btlTiemChung);
    }//GEN-LAST:event_btlTiemChungFocusGained

    private void txtMaHoSoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtMaHoSoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtMaHoSoActionPerformed

    private void txtMaVatNuoiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtMaVatNuoiActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtMaVatNuoiActionPerformed

    private void jRadioButtonKetThucActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonKetThucActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonKetThucActionPerformed

    private void txtTenBenhActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTenBenhActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtTenBenhActionPerformed

    private void ckboxMaVatNuoi1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ckboxMaVatNuoi1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ckboxMaVatNuoi1ActionPerformed

    private void ckboxTenVatNuoiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ckboxTenVatNuoiActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ckboxTenVatNuoiActionPerformed

    private void ckboxTenBenhActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ckboxTenBenhActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ckboxTenBenhActionPerformed

    private void jRadioButtonChuaKetThucActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonChuaKetThucActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonChuaKetThucActionPerformed

    private void btnXoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnXoaActionPerformed
        TCMainPanel_evt.btnXoaActionPerformed(btlTiemChung);
    }//GEN-LAST:event_btnXoaActionPerformed

//</editor-fold>
    public JTable getBtlTiemChung() {
        return btlTiemChung;
    }
//
//    public void setBtlTiemChung(JTable btlTiemChung) {
//        this.btlTiemChung = btlTiemChung;
//    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTable btlTiemChung;
    private javax.swing.JButton btnChiTiet;
    private javax.swing.JButton btnClose;
    private javax.swing.JButton btnIn;
    private javax.swing.JButton btnLietKe;
    private javax.swing.JButton btnSua;
    private javax.swing.JButton btnSuaTrangThai;
    private javax.swing.JButton btnThem;
    private javax.swing.JButton btnThemPieuTiemChung;
    private javax.swing.JButton btnXoa;
    private javax.swing.ButtonGroup buttonGroupTrangThai;
    private javax.swing.JCheckBox ckboxMaVatNuoi;
    private javax.swing.JCheckBox ckboxMaVatNuoi1;
    private javax.swing.JCheckBox ckboxTenBenh;
    private javax.swing.JCheckBox ckboxTenVatNuoi;
    private com.toedter.calendar.JDateChooser jDateChooserNgayKetThuc;
    private com.toedter.calendar.JDateChooser jDateChooserngayBatDau;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanelBody;
    private javax.swing.JPanel jPanelCacChucNang;
    private javax.swing.JPanel jPanelCanhDuoi;
    private javax.swing.JPanel jPanelCanhLePhai;
    private javax.swing.JPanel jPanelCanhLeTrai;
    private javax.swing.JPanel jPanelCanhLeTren;
    private javax.swing.JPanel jPanelHead;
    private javax.swing.JPanel jPanelLeftHead;
    private javax.swing.JRadioButton jRadioButtonChuaKetThuc;
    private javax.swing.JRadioButton jRadioButtonKetThuc;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel pnlDieuKienLietKe;
    private javax.swing.JTextField txtMaHoSo;
    private javax.swing.JTextField txtMaVatNuoi;
    private javax.swing.JFormattedTextField txtTenBenh;
    private javax.swing.JTextField txtTenVatNuoi;
    // End of variables declaration//GEN-END:variables
}
